import { defineStore } from "pinia";
import axios from "../axios";

const withdrawalStore = defineStore({
    id: 'withdrawalStore',
    state: () => ({
        withdrawalList: []
    }),

    actions: {
        getwithdrawalList () { 
            return new Promise((reslove, reject) => { 
                axios.get('withdrawal').then(res => { 
                    reslove(res.data)
                }).catch(err => { 
                    reject(err.data)
                })
            })
        }
    }
})

export default withdrawalStore